<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMenuActionMapPermissionTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('menu_action_map_permission', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('action_id')->comment('功能ID');
            $table->unsignedInteger('permission_id')->comment('权限ID');
            $table->timestamps();

            $table->comment = '功能权限映射表';
            $table->engine = 'InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('menu_action_map_permission');
    }

}
